import request from '@/utils/request'

// 统一前缀
var prefix = '/recruitService'

//查询岗位树
export function lookPostCategoryTree() {
  return request({
    url: `${prefix}/postCategory/tree`,
    method: 'GET',
  })
}

//条件查询岗位分类
export function lookPostCategory(postCategory) {
  return request({
    url: `${prefix}/postCategory`,
    method: 'GET',
    params: postCategory,
  })
}

//添加一条岗位分类
export function insertOnePostCategory(postCategory) {
  return request({
    url: `${prefix}/postCategory`,
    method: 'POST',
    data: postCategory,
  })
}

//修改岗位分类
export function updateOnePostCategory(postCategory) {
  return request({
    url: `${prefix}/postCategory`,
    method: 'PUT',
    data: postCategory,
  })
}

//删除岗位分类
export function deletePostCategory(ids) {
  return request({
    url: `${prefix}/postCategory`,
    method: 'DELETE',
    data: ids,
  })
}
